package com.lss.studydemo;

public class TemperatureEvent {
    private float currentTemperature;
    private float targetTemperature;
    public TemperatureEvent(float currentTemperature, float targetTemperature) {
        this.currentTemperature = currentTemperature;
        this.targetTemperature = targetTemperature;
    }
    public float getCurrentTemperature() {
        return currentTemperature;
    }
    public float getTargetTemperature() {
        return targetTemperature;
    }

    /**
     * 超过目标温度
     * @return
     */
    public boolean isExceeded() {
        return currentTemperature > targetTemperature;
    }
}
